package com.dididoctor.patient.Activity.Doctor.Doctordetail;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.dididoctor.patient.Dialog.adapter.BaseDialog;
import com.dididoctor.patient.R;

/**
 * @version 2.0
 * @类描述：
 * @项目名称：ddgh
 * @类名称： SignFailDialog
 * @包名称： com.dididoctor.patient.Activity.Doctor.Doctordetail
 * @创建人： zhanjunjie
 * @创建时间：2016/5/12 17:17
 * @修改人：
 * @修改时间：2016/5/12 17:17
 * @修改备注： new parent class(用一句话描述修改了什么)
 */
public class SignFailDialog extends BaseDialog {

    private TextView mTvConfirm, mTvCancel, mTvTitle;
    private Context context;
    private ClickListener clickListener;

    public SignFailDialog(Context context,ClickListener clickListener) {
        super(context);
        this.context = context;
        this.clickListener = clickListener;
        setContentView(R.layout.dialog_signfail);
        mTvConfirm = (TextView) findViewById(R.id.tv_confirm);
        mTvConfirm.setOnClickListener(this);
        mTvCancel = (TextView) findViewById(R.id.tv_cancel);
        mTvCancel.setOnClickListener(this);
        mTvTitle = (TextView) findViewById(R.id.tv_updata_content);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.tv_confirm:
                clickListener.Retry();
                dismiss();
                break;
            case R.id.tv_cancel:
                clickListener.Toreimburse();
                dismiss();
                break;
            default:
                break;
        }
        super.onClick(v);
    }

    public interface ClickListener {
        void Retry();

        void Toreimburse();
    }


}
